/**
 * PLC控制
 */
(function(window, angular, undefined){

	var module = angular.module('water.entity.bdPlcControl',['water.common.AJAXService']);
	
	module.service('$bdPlcControlService',function($AJAXService){
				
		/**
		 * 获取设备信息
		 */
		this.getDeviceInfo = function(){
			var promise = $AJAXService.post("/bd-plc-control/get-device-info");
			return promise;
		}

        /**
		 * 获取系统信息
         */
        this.getSystemInfo = function(){
            var promise = $AJAXService.post("/bd-plc-control/get-system-info");
            return promise;
        }

        /**
		 * 获取系统详情信息
         */
        this.getSystemDetailInfo = function(){
            var promise = $AJAXService.post("/bd-plc-control/get-system-detail-info");
            return promise;
        }

        /**
         * 获取设备详情信息
         */
        this.getDeviceDetailInfo = function(queryObj){
            var promise = $AJAXService.post("/bd-plc-control/get-device-detail-info",queryObj);
            return promise;
        }

        /**
         * 获取PLC报警
         */
        this.getPlcAlarm = function(queryObj){
            var promise = $AJAXService.post("/bd-plc-control/get-plc-alarm",queryObj);
            return promise;
        }

        /**
         * 通过设备获取参数
         */
        this.getParamByDevice = function(queryObj){
            var promise = $AJAXService.post("/bd-plc-control/get-param-by-device",queryObj);
            return promise;
        }
	})
}(window, angular));